package com.atguigu.bigdata.scala.mytest.chapter05

object Test2 {
    def main(args: Array[String]): Unit = {
      //逻辑
      def a(x:Int,y:Int):Unit={
        println(x+y)
      }
      //test1函数需要传递一个逻辑过来
      def test1(f:(Int,Int)=>Unit):Unit={
        //使用逻辑
        f(2,3)
      }
      test1(a)

      test1((x:Int,y:Int)=>{println(x*y)})
      

    }
}
